package pe.edu.upc.dew.grupo7.web;

import java.io.IOException;

import javax.servlet.ServletConfig;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.web.context.support.WebApplicationContextUtils;

import pe.edu.upc.dew.grupo7.service.FuncionService;
import pe.edu.upc.dew.grupo7.service.PeliculaService;
import pe.edu.upc.dew.grupo7.service.UsuarioService;

/**
 * Servlet implementation class ComprarServlet
 */
public class ComprarServlet extends HttpServlet {
	private static final long serialVersionUID = 1L;
       private UsuarioService usuarioService;
    /**
     * @see HttpServlet#HttpServlet()
     */
    public ComprarServlet() {
        super();
        // TODO Auto-generated constructor stub
    }
    public void init(ServletConfig config) throws ServletException {
    	
		this.usuarioService = WebApplicationContextUtils
				.getWebApplicationContext(config.getServletContext()).getBean(
						"usuarioService", UsuarioService.class);
		
	}
	/**
	 * @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse response)
	 */
	protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		request.getRequestDispatcher("comprar.jsp")
		.forward(request, response);
	}

	/**
	 * @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse response)
	 */
	protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		// TODO Auto-generated method stub
	}

}
